/* === 0. Reset & 基礎 === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: '微軟正黑體', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    color: #f5f5f5;
    overflow-x: hidden; /* ✅ 防止 full-bleed 造成水平捲軸 */
    /* 背景：上層暗色漸層 + 底層 hero 圖 index1.jpg */
    background-image:
        linear-gradient(135deg, rgba(2, 8, 20, 0.96), rgba(14, 32, 52, 0.96)),
        url("index1.jpg");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

/* 讓 body.lounge-background 也吃到同樣風格 */
body.lounge-background {
    background-image:
        linear-gradient(135deg, rgba(2, 8, 20, 0.96), rgba(14, 32, 52, 0.96)),
        url("index1.jpg");
}

/* 全站內容最大寬度：接近滿版（桌機再加寬一點＋少一點 padding） */
.page-container {
    max-width: 1360px;  /* ✅ 桌機再寬一點，減少左右空 */
    margin: 0 auto;
    padding: 0 16px;    /* ✅ 原本 24px → 16px，文字更靠近邊緣 */
}

/* === 1. Header & Navigation === */

header {
    position: sticky;
    top: 0;
    z-index: 100;
                   /* ⭐ 新增：讓 ::before 以它為基準 */
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* overflow: hidden;  ← ⭐ 這行刪掉，否則會把背景裁掉 */
}

/* 用偽元素做滿版背景，內容仍然居中 */
header::before {
    content: "";
    position: absolute;
    inset: 0;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    background-image:
        linear-gradient(180deg, rgba(3, 8, 20, 0.2), rgba(3, 8, 20, 0.2)),
        url("index4.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

header > h1 {
    margin: 0;
    /* 縮小標題高度與字體 */
    padding: 8px 16px 4px 16px;
    text-align: center;
    font-size: 1.2rem;           /* 原本 1.4rem → 縮小 */
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #f1c40f; /* 金色標題 */
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}

/* 導覽列：桌機接近滿版排列 */
nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;                    /* 稍微縮小間距 */
    padding: 6px 12px 10px 12px; /* 整體高度變低 */
    flex-wrap: wrap;
}

/* 有下拉選單的項目外容器：加 hover 緩衝帶 */
.nav-item-dropdown {
    position: relative;
    padding-bottom: 16px;   /* 增加下方 hover 區域 */
    margin-bottom: -16px;   /* 抵銷 padding，不影響版面高度 */
}

/* 🔥 隱形橋樑：滑鼠從按鈕移到選單途中不會中斷 hover */
.nav-item-dropdown::after {
    content: "";
    position: absolute;
    left: -12px;   /* 左右擴大一點容錯範圍 */
    right: -12px;
    top: 100%;     /* 從按鈕底部開始 */
    height: 24px;  /* 橋樑高度，可視需要改 28px / 30px */
    background: transparent;
    z-index: 1;
}
.nav-home-desktop {
    display: none;
}

/* 一般導覽按鈕（縮小版） */
.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;           /* 原本 8x16 → 稍微縮小 */
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.32);  /* 略深一點讓文字浮出背景圖 */
    color: #e0e4ea;
    text-decoration: none;
    font-size: 0.82rem;          /* 字體略小一級 */
    font-weight: 500;
    transition: all 0.18s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
}

/* 下拉內容：改用透明度控制 + 平滑動畫 */
.dropdown-content {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 180px;
    background: rgba(6, 14, 30, 0.98);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
    padding: 6px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

/* hover 時顯示選單 */
.nav-item-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 9px 16px;
    color: #e0e4ea;
    text-decoration: none;
    font-size: 0.82rem;
    white-space: nowrap;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f39c12;
    padding-left: 22px;
}

/* Logo */
nav a.logo-button {
    padding: 0 8px;
}

.nav-logo {
    height: 46px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.75);
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* 滑鼠移到 logo 時：微放大 + 金色柔光 */
.nav-logo:hover {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(255, 185, 80, 0.55);
}

/* 班表高亮按鈕 */
.nav-highlight {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;             /* 稍微縮小 */
    border-radius: 999px;
    background: linear-gradient(135deg, #ff9f43, #e67e22);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(230, 126, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: all 0.22s ease;
}

.nav-highlight:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 28px rgba(230, 126, 34, 0.75);
}
.nav-home-mobile {
    display: none;
}

/* === 手機漢堡按鈕 & 背景遮罩（桌機預設隱藏） === */

.nav-toggle {
    display: none; /* 桌機隱藏，手機 media query 再開啟 */
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    z-index: 120;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #ffffff;
    margin: 3px 0;
    border-radius: 999px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

/* 當 nav 打開時，把三條線變成 X */
body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* 背景遮罩 */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 90;
}

.hidden {
    display: none !important;
}

/* 打開選單時顯示遮罩 */
body.nav-open .nav-backdrop {
    display: block;
}

/* === 2. Main Hero 區：接近滿版寬度 === */

main.hero-page {
    padding: 40px 0 60px 0;
}

/* 用 page-container 包住，使內容接近整個螢幕寬度 */
.main-hero-card {
    margin: 0 auto;
    max-width: 1320px;      /* ✅ 桌機主內容再放寬，左右留白更少 */
    background: rgba(7, 12, 28, 0.94);
    border-radius: 24px;
    padding: 40px 40px 48px 40px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6);
}

/* Hero 主標題 */
.hero-title {
    text-align: left;
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    color: #ffffff;
    letter-spacing: 1px;
}

/* Hero 副文案（簡短說明） */
.hero-text {
    margin-bottom: 24px;
    font-size: 1.02rem;
    color: #e1e4ec;
}

.hero-text p {
    margin: 0 0 10px 0;
}

.hero-text strong {
    color: #f39c12;
}

/* === 3. 快速跳轉 + CTA === */

.quick-nav-label {
    display: block;
    margin-top: 26px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #9aa4c2;
}

.quick-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.quick-link-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #e0e4ea;
    text-decoration: none;
    font-size: 0.88rem;
    border: 1px solid rgba(236, 74, 15, 0.79);
    transition: all 0.2s ease;
}

.quick-link-pill:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(230, 126, 34, 0.5);
}

.quick-link-pill.hot {
    background: rgba(255, 149, 0, 0.12);
    border-color: rgba(255, 149, 0, 0.7);
    color: #ffb142;
}

/* CTA 標題 + 按鈕群組 */
.contact-section-label {
    display: block;
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #f1c40f;
}

.cta-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 34px;
}

.brand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
    transition: all 0.2s ease;
}

.brand-btn span {
    font-size: 1.1rem;
}

/* 按鈕色系 */
.btn-line { background: #06c755; }
.btn-line:hover { background: #05b54d; transform: translateY(-2px); }

.btn-tg { background: #0088cc; }
.btn-tg:hover { background: #0077b3; transform: translateY(-2px); }

.btn-channel {
    background: linear-gradient(135deg, #8e44ad, #c0392b);
}
.btn-channel:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.btn-phone {
    background: #2c3e50;
}
.btn-phone:hover {
    background: #1f2a36;
    transform: translateY(-2px);
}

/* === 4. 內容區塊（SEO / FAQ）=== */

/* 大區塊：接近滿版、左對齊排版 */
.seo-content-block {
    margin-top: 24px;
    padding: 24px 22px 22px 22px;
    border-radius: 16px;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 60%) rgba(10, 16, 38, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #dde3f1;
    text-align: left;
}

.seo-content-block h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: #ffffff;
}

.seo-content-block p {
    margin: 6px 0 10px 0;
    font-size: 0.98rem;
}

.seo-info-list {
    margin: 10px 0 0 0;
    padding-left: 22px;
    list-style: disc;
    font-size: 0.96rem;
}

/* FAQ 區塊 */
#faq-section {
    margin-top: 32px;
}

#faq-section h2 {
    font-size: 1.35rem;
}

.faq-item {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(15, 23, 50, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item h3 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #f39c12;
}

.faq-item p {
    margin: 0;
    font-size: 0.95rem;
    color: #dce2f0;
}

/* === 5. 圖片樣式（如果你在 HTML 裡插入 index2、index3 圖片）=== */

/* Hero 段落可用的圖片（例如放在文案下面） */
.hero-image {
    width: 100%;
    max-width: 1180px;
    border-radius: 18px;
    margin: 18px auto 8px auto;
    display: block;
    object-fit: cover;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.7);
}

/* 某些內容段落右側小圖用 */
.section-image {
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.65);
    margin-top: 10px;
}

/* 如果你想把某段文字 + 圖片並排，可以在 HTML 外面包一個 .text-with-image */
.text-with-image {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 22px;
    align-items: center;
}

/* === 6. Footer === */

footer {
    padding: 32px 24px 20px 24px;
    /* 改成：背景圖 index5.jpg + 下方深色漸層 */
    background-image:
        linear-gradient(180deg, rgba(2, 6, 14, 0.2), rgba(2, 6, 14, 0.2)),
        url("index5.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 30px;

    /* ✅ Footer 背景也 full-bleed，從最左到最右 */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-contact {
    max-width: 1320px;  /* 跟 main-hero-card 接近，整體一致 */
    margin: 0 auto 16px auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 14px;
    backdrop-filter: blur(4px);
}

.info-item.signature p {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.9rem;
}

.contact-item .label {
    font-weight: 700;
    margin-right: 6px;
    color: #f39c12;
}

.contact-item .value {
    color: #e0e4ea;
    text-decoration: none;
}

.contact-item .value:hover {
    color: #ffffff;
    text-decoration: underline;
}

.copyright {
    max-width: 1320px;
    margin: 10px auto 0 auto;
    text-align: center;
    font-size: 0.82rem;
    color: #c0c7de;
}

/* === 7. RWD 手機版 === */

.nav-home-mobile {
    display: none;
}
/* 首頁按鈕：外觀與 nav-btn 相同，只是顏色特別 */
.nav-home {
    color: #f1c40f !important;  /* ✨ 金色文字（你網站主色） */
    border-color: rgba(255, 215, 120, 0.9) !important;
    font-weight: 700 !important;
}

/* hover 時也要有獨立效果（避免變成和其他按鈕一樣） */
.nav-home:hover {
    background: rgba(255, 215, 120, 0.15) !important;
    color: #fff6d1 !important;
    transform: translateY(-1px);
}

.nav-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffd27f; /* 金色字體 */
    text-shadow: 0 0 8px rgba(0,0,0,0.7);
    letter-spacing: 2px;
    display: inline-block;
    padding: 6px 10px;
}

.schedule-page {
    max-width: 1320px;   /* ✅ 跟 main-hero-card 一致 */
    margin: 32px auto 40px auto;
    padding: 26px 22px 30px 22px;
    border-radius: 22px;
    background: radial-gradient(circle at top left,
                rgba(255, 255, 255, 0.06),
                transparent 60%)
                rgba(4, 10, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {

    /* ✅ 內容容器：手機改成貼滿版 */
    .page-container {
        max-width: 100%;
        padding: 0;          /* 取消左右 24px 大邊距，讓內文更滿版 */
    }

    /* 標題幫右邊漢堡讓位，不會擠在一起 */
    header > h1 {
        font-size: 0.95rem;
        padding: 8px 60px 4px 12px; /* 右邊多留空間給 nav-toggle */
        line-height: 1.4;
        text-align: left;
    }

    /* 手機：nav 改成「浮起來的 App 卡片」 */
    nav {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: 56px;                    /* 大約是 header 高度 */
        width: 100%;
        max-width: 420px;             /* 中間一塊卡片 */
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0 14px 12px 14px;

        max-height: 0;                /* 預設收合 */
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.18s ease;
        z-index: 110;
    }

    /* nav 展開時：變成一個獨立的深色卡片 */
    body.nav-open nav {
        max-height: calc(100vh - 80px);
        opacity: 1;
        pointer-events: auto;
        margin-top: 6px;
        background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 60%)
                    rgba(3, 8, 20, 0.98);
        border-radius: 18px 18px 24px 24px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 0 18px 32px rgba(0, 0, 0, 0.85);
        overflow-y: auto;
    }

    /* 手機版顯示漢堡按鈕（開關位置固定在右上角） */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        padding: 7px 14px;
        border-radius: 999px;
        border: 1px solid rgba(255, 215, 120, 0.95);
        background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 60%)
                    rgba(0, 0, 0, 0.9);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    }

    /* 手機上不使用三條線，改用字元圖示 */
    .nav-toggle span {
        display: none;
    }

    /* nav 關閉：顯示列表圖示 ≡（比較顯眼） */
    .nav-toggle::before {
        content: "≡";
        font-size: 20px;
        line-height: 1;
        color: #ffd27f;
    }

    /* nav 打開：改成關閉圖示 ✕（同一個位置，不再跑掉） */
    body.nav-open .nav-toggle::before {
        content: "✕";
        font-size: 20px;
        color: #ffffff;
    }

    /* 手機：不需要桌機那種 hover 橋樑，避免怪空隙 */
    .nav-item-dropdown {
        padding-bottom: 0;
        margin-bottom: 0;
    }
    .nav-item-dropdown::after {
        display: none;
    }

    /* ✅ 首頁按鈕：手機版第一個、置中 */
    .nav-home-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;

        font-size: 0.92rem;
        padding: 9px 12px;
        margin-top: 10px;
        background: linear-gradient(135deg, #2c3e50, #1f2937);
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        font-weight: 700;
    }

    /* 手機版 nav 按鈕 → App 列表風格（文字置中） */
    .nav-btn {
        font-size: 0.86rem;
        padding: 9px 12px;
        width: 100%;
        justify-content: center;     /* ✅ 文字置中 */
        text-align: center;
        background: rgba(0, 0, 0, 0.65);
        border-radius: 12px;
        margin-top: 2px;
        border: 1px solid rgba(255, 255, 255, 0.18);
    }

    .nav-btn:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.4);
        transform: translateY(0);    /* 手機不要往上跑，避免看起來破圖 */
    }

    /* 班表按鈕：保留特殊感，但也變成列表樣式，文字置中 */
    .nav-highlight {
        font-size: 0.9rem;
        padding: 10px 12px;
        width: 100%;
        justify-content: center;
        margin-top: 6px;
        border-radius: 999px;
        box-shadow: 0 10px 24px rgba(230, 126, 34, 0.7);
    }

    /* logo 獨立置中，不會卡在側邊 */
    nav a.logo-button {
        align-self: center;
        margin: 10px 0 4px;
        padding: 0;
    }

    .nav-logo {
        height: 40px;
    }

    /* 手機上不使用 hover 下拉，直接點主項就好 */
    .dropdown-content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* 背景遮罩：讓卡片有 App-modal 感覺 */
    body.nav-open .nav-backdrop {
        display: block;
    }

    /* ✅ 主內容卡片：貼滿版、內距縮小，文字更寬 */
    .main-hero-card {
        max-width: 100%;
        margin: 12px 0 0 0;          /* 貼滿螢幕左右 */
        padding: 20px 16px 22px 16px;
        border-radius: 0;             /* 讓邊緣與螢幕貼齊，有滿版感 */
        box-shadow: 0 18px 32px rgba(0, 0, 0, 0.7);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    /* ✅ 內文文字區：維持較大寬度 */
    .hero-text {
        font-size: 0.98rem;
    }

    /* ✅ SEO 文字區塊：同樣貼滿版 */
    .seo-content-block {
        margin-top: 18px;
        margin-left: 0;
        margin-right: 0;
        padding: 18px 16px 18px 16px;
        border-radius: 0;
    }

    .seo-content-block p,
    .seo-info-list {
        font-size: 0.96rem;
    }

    /* ✅ FAQ 卡片也放寬文字寬度 */
    .faq-item {
        margin-top: 12px;
        padding: 14px 16px;
        border-radius: 0;
    }

    /* ✅ 班表頁：手機滿版 */
    .schedule-page {
        max-width: 100%;
        margin: 20px 0 30px 0;
        padding: 20px 16px 24px 16px;
        border-radius: 0;
        box-shadow: 0 18px 32px rgba(0, 0, 0, 0.7);
    }

    .cta-group {
        grid-template-columns: 1fr;
    }

    .text-with-image {
        grid-template-columns: 1fr;
    }

    .hero-image {
        max-width: 100%;
    }

    footer {
        padding: 24px 18px 18px 18px;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
    }
}
