/* --- 基礎變數設定 --- */
:root {
    --primary-dark: #2c3e50;
    --accent-orange: #ff9a9e; /* SEO 強調色 */
    --bg-gray: #f9f9f9;
    --text-main: #2d3436;
    --text-light: rgba(255, 255, 255, 0.9);
}

body {
    font-family: "PingFang TC", "Microsoft JhengHei", sans-serif;
    background-color: var(--bg-gray);
    margin: 0;
    color: var(--text-main);
    line-height: 1.6;
    
    /* 修正下面空白的關鍵： */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 讓身體至少跟螢幕一樣高 */
}

/* 核心修正：合併原本重複定義的 container，確保 flex: 1 有效 */
.container {
    flex: 1; /* 這行會把中間內容區撐開，把 Footer 頂到底部 */
    max-width: 1100px;
    margin: 3rem auto; /* 統一使用 3rem，解決妳提到的 740 行衝突 */
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- 精簡版 Header --- */
.main-header {
    background: #ffffff;
    color: #333;
    padding: 2.5rem 1rem;
    text-align: center;
}

.brand-name {
    font-size: 2rem;
    letter-spacing: 3px;
    margin: 0;
    font-weight: 800;
}

.brand-tagline {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 5px 0 15px 0;
    letter-spacing: 1px;
    color: #999;
}

.seo-statement {
    max-width: 650px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 15px;
}

.seo-statement p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    color: #666;
}

@media (max-width: 600px) {
    .main-header { padding: 1.5rem 1rem; }
    .brand-name { font-size: 1.6rem; }
    .seo-statement { display: none; }
}

/* --- 導覽列 (Menu) --- */
.nav-container {
    display: flex;
    justify-content: flex-start; 
    gap: 12px;
    padding: 15px 20px;
    background: #fff;
    margin-top: 0 !important;
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch;
}

.nav-container::-webkit-scrollbar { display: none; }

.nav-btn {
    text-decoration: none !important;
    padding: 8px 20px;
    border-radius: 50px;
    background: #f8f8f8;
    color: #666 !important;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap !important;
    flex-shrink: 0 !important; 
    display: inline-block;
}

@media (min-width: 1024px) {
    .nav-container { justify-content: center; }
}

.nav-btn.active {
    background-color: #ff9a9e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(255, 154, 158, 0.3);
}

/* --- 卡片網格佈局 --- */
.category-content {
    display: none; /* 預設隱藏，由 JS 控制 */
}

.category-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.card-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 25px;
    padding: 20px 0;
    align-items: stretch;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    position: relative;
    overflow: visible !important;
    scroll-margin-top: 100px;
}

.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); 
    z-index: 100;
}

.location-tag {
    font-size: 0.75rem;
    color: #ff9a9e;
    font-weight: bold;
    margin-bottom: 10px;
}

.card h3 { margin: 0 0 12px 0; font-size: 1.3rem; font-weight: 500; }
.card p { font-size: 0.95rem; color: #636e72; flex-grow: 1; margin-bottom: 20px; }

/* --- 按鈕樣式 --- */
.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

.btn-blog, .btn-buy, .btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-blog { border: 1px solid #ff9a9e; color: #ff9a9e; min-width: 110px; }
.btn-blog:hover { background-color: #ff9a9e; color: white; }

.btn-buy, .btn-link { background-color: #ff9a9e; color: white !important; border: none; min-width: 110px; }
.btn-buy:hover { background-color: #ff858a; }

/* --- 下拉選單 --- */
.dropdown { position: relative; display: inline-flex; justify-content: center; }
.dropdown-content {
    display: none; 
    position: absolute;
    background-color: #ffffff;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-radius: 12px;
    z-index: 9999;
    top: 100%; 
    left: 50%;
    transform: translateX(-50%); 
    margin-top: 5px;
    border: 1px solid #f3f3f3;
    overflow: hidden;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a {
    color: #444 !important;
    padding: 12px 20px;
    text-decoration: none !important;
    display: block;
    font-size: 0.85rem;
    text-align: center;
    transition: 0.2s;
}
.dropdown-content a:hover { background-color: #fff5f6; color: #ff9a9e !important; }

/* --- 二級分類按鈕 --- */
.sub-nav { display: flex; justify-content: center; gap: 10px; margin: 20px 0 30px; flex-wrap: wrap; }
.sub-btn {
    background-color: #ffffff; border: 1px solid #ddd; color: #666;
    padding: 6px 18px; border-radius: 50px; cursor: pointer; font-size: 0.85rem; transition: 0.3s;
}
.sub-btn:hover, .sub-btn.active { border-color: #ff9a9e; color: #ff9a9e; background-color: #fff5f6; }
.sub-btn.active { background-color: #ff9a9e !important; color: #ffffff !important; }

/* --- 待產包勾選功能 --- */
.checklist-section { background: #fff; border-radius: 15px; padding: 40px; margin: 20px 0 50px 0; border: 1px solid #f0f0f0; }
.checklist-group label { display: flex; align-items: center; cursor: pointer; width: 100%; user-select: none; }
.checklist-group input[type="checkbox"] { margin-right: 12px; width: 16px; height: 16px; accent-color: #ff9a9e; }
.checklist-group input[type="checkbox"]:checked + span,
.checklist-group input[type="checkbox"]:checked ~ .checklist-link {
    color: #bbb; text-decoration: line-through; opacity: 0.6;
}
.checklist-link { color: #666; text-decoration: none; transition: 0.3s; border-bottom: 1px solid transparent; }
.checklist-link:hover { color: #ff9a9e; border-bottom: 1px solid #ff9a9e; }

/* --- 出國準備雙卡片導流區 --- */
.related-prep-box {
    margin: 60px 0 40px;
    border-top: 1px solid #eee;
    padding-top: 40px;
    width: 100%;
}

.related-prep-box h3 {
    text-align: center;
    font-weight: 500;
    margin-bottom: 25px;
    color: #333;
}

/* 雙欄網格佈局 */
.prep-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 電腦版雙欄 */
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.prep-nav-card {
    display: flex;
    align-items: center;
    background: #fdfdfd; /* 淺灰色底 */
    border-radius: 20px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

/* 網卡那張可以用藍色底做區別 */
.prep-nav-card[href="internetsim.html"] {
    background: #f0faff;
    border-color: #e0f2fe;
}

.prep-nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.prep-nav-card[href="internetsim.html"]:hover {
    box-shadow: 0 10px 25px rgba(0, 174, 239, 0.15);
}

.card-icon {
    font-size: 35px;
    margin-right: 15px;
}

.card-content h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

/* 網卡標題色 */
.prep-nav-card[href="internetsim.html"] h4 {
    color: #00AEEF;
}

.card-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
}

/* 手機版 RWD：自動變回單欄 */
@media (max-width: 768px) {
    .prep-card-grid {
        grid-template-columns: 1fr;
    }
    .prep-nav-card {
        padding: 15px;
    }
}

/* --- Footer --- */
.main-footer {
    background: #fafafa;
    color: #888;
    padding: 1.5rem 0;
    margin-top: 4rem;
    font-size: 0.85rem;
    border-top: 1px solid #888;
    width: 100%;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #666; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: #ff9a9e; }

@media (max-width: 768px) {
    .footer-container { flex-direction: column; gap: 15px; text-align: center; }
}

/* 影片響應式容器 */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 15px; /* 圓角與頁面風格統一 */
    margin: 30px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* 麵包屑專用容器 */
.breadcrumb-container {
    max-width: 1200px;      /* 確保與您的內容區塊同寬 */
    margin: 0 auto;         /* 水平置中 */
    padding: 35px 20px 10px 20px; /* 上 35px(拉開導覽列) 左右 20px(內縮) 下 10px(拉開標題) */
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #a0aec0; /* 預設斜線與文字顏色 */
}

.breadcrumb-item a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #ff85a2; /* 滑過時變為品牌粉色 */
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 12px;
    color: #cbd5e0;
}

.breadcrumb-item.active {
    color: #4a5568;
    font-weight: 500;
}