/* style/index-style.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;700&family=Noto+Sans+TC:wght@300;400;600&display=swap');

:root {
    --theme-primary: #688277;       
    --theme-primary-hover: #556B61; 
    --accent-wood: #C2A88A;         
    --bg-main: #F9F9F7;             
    --text-dark: #2C302E;           
    --text-muted: #7A7A7A;          
    --border-light: #E5E5E5;        
}

/* 👑 加入 overflow-x: hidden 徹底消滅手機橫直向滑動時產生的白邊 */
html, body { scroll-behavior: smooth; overflow-x: hidden; } 
body { 
    margin: 0; 
    font-family: 'Noto Sans TC', sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-dark); 
    line-height: 1.6; 
}
a { text-decoration: none; color: inherit; } 
* { box-sizing: border-box; } 

h1, h2, h3, h4 { font-family: 'Noto Serif TC', serif; letter-spacing: 1.5px; margin: 0; }

/* ==========================================
   🌟 頂部：毛玻璃導覽列
========================================== */
.glass-header { 
    position: fixed; /* 👑 改用 fixed，強制懸浮跟隨，不受 overflow 影響 */
    top: 0; 
    left: 0;         
    width: 100%;     /* fixed 狀態下 100% 就是完美滿版 */
    z-index: 1000; 
    background: rgba(249, 249, 247, 0.75); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    padding: 15px 0; 
    transition: box-shadow 0.3s; 
}
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Noto Serif TC', serif; font-size: 1.6rem; font-weight: 700; color: var(--theme-primary); text-decoration: none; }
/* ... (下方的 .nav-links 與 .nav-search 保持不變) ... */
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-wood); } 
.nav-search { display: flex; align-items: center; background: #fff; padding: 8px 15px; border-radius: 30px; border: 1px solid var(--border-light); }
.nav-search input { border: none; outline: none; background: transparent; margin-left: 8px; font-size: 0.9rem; width: 150px; }

/* ==========================================
   🌟 區塊 1：Hero 輪播大圖區
========================================== */
.hero-slider { position: relative; width: 100%; height: 100dvh; min-height: 600px; overflow: hidden; background: #222; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1); transition: opacity 1.5s ease-in-out, transform 8s linear; }
.slide.active { opacity: 1; z-index: 2; transform: scale(1.06); transition: opacity 1.5s ease-in-out, transform 8s linear; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%); }
.slide-content { position: relative; z-index: 3; max-width: 1400px; margin: 0 auto; padding: 0 40px; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; color: #fff; }

.slide-content h1 { position: relative; font-size: 3.5rem; margin-bottom: 25px; padding: 15px 30px; display: inline-block; background: rgba(0, 0, 0, 0.15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 2px; }
.slide-content h1::before { content: ''; position: absolute; top: 20px; left: -15px; width: 100%; height: 100%; border: 1px solid rgba(255, 255, 255, 0.7); z-index: -1; pointer-events: none; }
.slide-content p { font-size: 1.2rem; font-weight: 300; margin-bottom: 30px; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* 按鈕樣式 */
.btn-glass-outline { background: transparent; border: 1px solid rgba(255, 255, 255, 0.8); color: #fff; padding: 12px 30px; border-radius: 4px; font-weight: 600; transition: all 0.3s ease; display: inline-block; }
.btn-glass-outline:hover { background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: #fff; }
.btn-outline { align-self: flex-start; background: transparent; color: var(--theme-primary); border: 1px solid var(--theme-primary); padding: 12px 30px; border-radius: 4px; font-weight: 600; transition: 0.3s; display: inline-block; }
.btn-outline:hover { background: var(--theme-primary); color: #fff; }

/* ==========================================
   共用設定：外容器與標題
========================================== */
.section-container { max-width: 1200px; margin: 80px auto; padding: 0 40px; }
.section-title-wrap { text-align: center; margin-bottom: 50px; }
.section-title-wrap h2 { font-size: 2rem; color: var(--text-dark); margin-bottom: 15px; }
.divider { width: 40px; height: 3px; background: var(--accent-wood); margin: 0 auto; }

/* ==========================================
   🌟 區塊 2：主打星行程 (本月強檔推薦)
========================================== */
.hero-tour-carousel { 
    display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory; 
    padding-bottom: 20px; /* 留出空間給底部的極簡進度條 */
    /* Firefox 瀏覽器的細捲軸支援 */
    scrollbar-width: thin; 
    scrollbar-color: var(--accent-wood) rgba(0,0,0,0.03); 
}

/* 👑 方案 D：極簡進度條設計 */
.hero-tour-carousel::-webkit-scrollbar { 
    height: 4px; /* 進度條的粗細，4px 非常細緻且有質感 */
}
.hero-tour-carousel::-webkit-scrollbar-track { 
    background: rgba(0, 0, 0, 0.04); /* 極淡的灰色軌道底色 */
    border-radius: 10px; 
    margin: 0 10vw; /* 讓軌道左右不貼邊，看起來更像一個獨立的 UI 介面 */
}
.hero-tour-carousel::-webkit-scrollbar-thumb { 
    background: var(--accent-wood); /* 使用白橡木色當作進度條顏色 */
    border-radius: 10px; 
}
.hero-tour-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--theme-primary); /* 滑鼠放上去時變成石綠色 */
}

.hero-tour-card { flex: 0 0 100%; scroll-snap-align: start; display: flex; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.04); }
.ht-image { flex: 6; }
.ht-image img { width: 100%; height: 100%; object-fit: cover; }

.ht-info { flex: 5; padding: 50px; display: flex; flex-direction: column; justify-content: center; background-color: #fff; border: 1px solid rgba(194, 168, 138, 0.25); border-left: 1px solid rgba(194, 168, 138, 0.1); }
.ht-info h3 { font-size: 2rem; margin-bottom: 10px; color: var(--theme-primary); }
.ht-subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 25px; line-height: 1.8; }
.ht-spots { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.spot-pill { background: var(--bg-main); border: 1px solid var(--border-light); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; color: var(--text-dark); }
.spot-pill i { color: var(--accent-wood); margin-right: 5px; }

/* 👑 內嵌迷你圖片畫廊：改為固定顯示 3 張大圖 */
.ht-mini-gallery { display: flex; gap: 15px; overflow-x: hidden; margin-bottom: 20px; }
.ht-mini-gallery img {
    width: calc(33.333% - 10px); /* 精準切分成三等分 */
    height: 140px;               /* 放大高度提升質感 */
    object-fit: cover; 
    border-radius: 6px; 
    flex-shrink: 0; 
    transition: 0.3s;
}
.ht-mini-gallery img:hover { filter: brightness(0.8); }

.ht-price-box { display: flex; gap: 40px; margin-bottom: 35px; border-top: 1px solid var(--border-light); padding-top: 20px; }
.price-item { display: flex; flex-direction: column; }
.price-item .label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 5px; }
.price-item .amount { font-size: 1.5rem; font-family: 'Noto Serif TC', serif; font-weight: bold; color: var(--text-dark); }
.price-item .price-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.5px; opacity: 0.85; }

/* ==========================================
   🌟 區塊 3：敘日嚴選企劃
========================================== */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.tour-card { background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-light); transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.tour-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.06); }
.tc-img-wrap { position: relative; height: 220px; }
.tc-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.badge-mini { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.9); color: var(--theme-primary); font-weight: bold; font-size: 0.8rem; padding: 4px 12px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.tc-content { padding: 25px; display: flex; flex-direction: column; flex: 1; }
.tc-title { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-dark); }
.tc-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; flex: 1; }
.tc-footer { border-top: 1px solid var(--border-light); padding-top: 15px; text-align: right; }
.tc-price { font-family: 'Noto Serif TC', serif; font-weight: bold; font-size: 1.1rem; color: var(--accent-wood); }

/* ==========================================
   🌟 區塊 4：探索世界的一隅 (Opal 深度美學升級版)
========================================== */
.opal-section { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; 
    align-items: flex-start; 
    margin-bottom: 120px; 
}
@media (min-width: 993px) {
    .opal-section.reverse .opal-text-col { order: 2; }
    .opal-section.reverse .opal-img-col { order: 1; }
}

.opal-text-col { display: flex; flex-direction: column; gap: 15px; }
.opal-title { font-family: 'Noto Serif TC', serif; font-size: 1.8rem; color: var(--text-dark); line-height: 1.4; margin: 0; }
/* 👑 裝飾線底色 (保持原來的木質配色) */
.opal-divider { 
    width: 100%; 
    max-width: 100%; 
    height: 3px; 
    background: var(--accent-wood); 
    margin: 5px 0 10px 0; 
    position: relative; 
    overflow: hidden; 
    border-radius: 2px; /* 加上微圓角更精緻 */
}

/* 👑 隱藏的擴展色 (使用您的標準主色：石綠色) */
.opal-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--theme-primary); /* 擴展出來的標準色 */
    
    /* 動畫魔法：初始寬度為 0，且以中心為原點 */
    transform: scaleX(0);
    transform-origin: center; 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 👑 觸發條件：當滑鼠移到整個文字區塊時，線條從中心往兩側展開 */
.opal-text-col:hover .opal-divider::after {
    transform: scaleX(1);
}
/* 👑 亮點清單：加入最大高度與優雅的隱形捲軸，段落再多也不怕撐破 */
.opal-list { 
    display: flex; flex-direction: column; gap: 18px; margin-top: 15px; margin-bottom: 10px;
    max-height: 380px; overflow-y: auto; padding-right: 15px;
}
.opal-list::-webkit-scrollbar { width: 4px; }
.opal-list::-webkit-scrollbar-track { background: transparent; }
.opal-list::-webkit-scrollbar-thumb { background: rgba(194, 168, 138, 0.4); border-radius: 4px; }
.opal-list::-webkit-scrollbar-thumb:hover { background: var(--accent-wood); }

.opal-list-item { display: flex; align-items: flex-start; gap: 15px; cursor: default; }
.opal-list-item:hover .opal-icon-wrap { background: var(--theme-primary); color: #fff; }
.opal-icon-wrap {
    width: 40px; height: 40px; border-radius: 50%; margin-top: 2px;
    background: rgba(104, 130, 119, 0.1); color: var(--theme-primary);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; flex-shrink: 0;
}
.opal-icon-wrap svg { width: 20px; height: 20px; }

/* 👑 新增的質感標籤與文字排版 */
.opal-list-text-wrap { display: flex; flex-direction: column; justify-content: center; }
.opal-point-tag { font-size: 0.75rem; color: var(--accent-wood); letter-spacing: 1px; margin-bottom: 3px; font-weight: bold; font-family: 'Outfit', Arial, sans-serif;}
.opal-list-text { font-size: 1rem; font-weight: 600; color: var(--text-dark); line-height: 1.5; }

.opal-img-col { position: relative; }
.opal-main-img { 
    aspect-ratio: 4 / 5; 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    position: relative; 
}
.opal-main-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; display: block; }
.opal-main-img:hover img { transform: scale(1.2); }

/* 👑 直式副標題壓圖魔法：防過長與自動閃避 */
.opal-vertical-subtitle {
    position: absolute;
    top: 25px;
    right: 25px; /* 預設靠右上 */
    max-height: 80%; /* 限制最高只佔圖片 60%，避免穿底 */
    overflow: hidden;
    writing-mode: vertical-rl; 
    text-orientation: mixed;
    color: #fff;
    font-family: 'Noto Serif TC', serif;
    font-size: 1.1rem;
    letter-spacing: 5px; 
    line-height: 1.6;
    z-index: 10;
    pointer-events: none; 
    
    background: rgba(44, 48, 46, 0.45); 
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 25px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);

    /* 文字太長時，底部優雅淡出消失 (Fade out) */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* 👑 完美解決第二篇壓到小圖的問題：如果是交錯排版，直式文字改放左上角！ */
.opal-section.reverse .opal-vertical-subtitle {
    right: auto;
    left: 25px; 
}

/* 角落交疊的畫框圖 */
.opal-sub-img {
    position: absolute; bottom: -30px; left: -30px; width: 200px; height: 200px;
    border-radius: 16px; border: 8px solid var(--bg-main); overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); display: block; z-index: 2;
}
.opal-sub-img img { width: 100%; height: 100%; object-fit: cover; }
.opal-section.reverse .opal-sub-img { left: auto; right: -30px; }

/* 📱 手機版與平板適應 */
@media (max-width: 992px) {
    .opal-section { grid-template-columns: 1fr; gap: 40px; margin-bottom: 70px; }
    .opal-sub-img { display: none; } 
    .opal-title { font-size: 1.8rem; }
    .opal-vertical-subtitle { top: 15px; right: 15px; font-size: 1rem; padding: 20px 10px; max-height: 50%; }
    .opal-section.reverse .opal-vertical-subtitle { left: 15px; } /* 手機版一樣閃避 */
}

/* ==========================================
   🌟 區塊 5：敘日誌專欄
========================================== */
.magazine-carousel { display: flex; gap: 25px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px; scrollbar-width: none; }
.magazine-carousel::-webkit-scrollbar { display: none; }
.mag-card { flex: 0 0 calc(33.333% - 17px); scroll-snap-align: start; border-radius: 8px; overflow: hidden; position: relative; display: block; }
.mag-card img { width: 100%; height: 280px; object-fit: cover; transition: transform 0.5s; }
.mag-card:hover img { transform: scale(1.05); }
.mag-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px 20px 20px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; }
.mag-title { font-size: 1.2rem; margin-bottom: 5px; }
.mag-subtitle { font-size: 0.9rem; opacity: 0.8; margin: 0; }

/* ==========================================
   📱 響應式佈局 (RWD)
========================================== */
@media (max-width: 992px) {
    .hero-tour-card { flex-direction: column; }
    .ht-info { padding: 30px; border-left: 1px solid rgba(194, 168, 138, 0.25); border-top: none; }
    .mag-card { flex: 0 0 calc(60%); }
    .slide-content h1 { font-size: 2.8rem; padding: 12px 25px; }
    .slide-content h1::before { top: 15px; left: -12px; }
    .snippet-article { gap: 30px; }
}

/* 👑 手機直式 (徹底修復版面撐破與字級階層) */
@media (max-width: 768px) {
    /* 1. 修正整體邊距，避免內容撐破 */
    .section-container { padding: 0 20px; margin: 50px auto; overflow: hidden; }
    .section-title-wrap h2 { font-size: 1.6rem; margin-bottom: 10px; }
    
    /* 2. 修復敘日嚴選企劃的 Grid 寬度，強制改為 1 欄，避免撐破白邊 */
    .tour-grid { grid-template-columns: 1fr; gap: 20px; }

    .hero-slider { height: 100dvh; min-height: 500px; }
    .nav-links, .nav-search { display: none; }
    .mag-card { flex: 0 0 85%; }
    
    .slide-content { padding: 110px 25px 40px; writing-mode: vertical-rl; text-orientation: upright; justify-content: flex-start; align-items: flex-start; text-align: left; }
    .slide-content h1 { font-size: 1.8rem; padding: 15px 10px; margin-bottom: 0; margin-left: 15px; letter-spacing: 3px; }
    .slide-content h1::before { top: -8px; left: 8px; width: 100%; height: 100%; }
    
    /* 字級全面調降 */
    .slide-content p { font-size: 0.95rem; margin-bottom: 0; margin-left: 20px; letter-spacing: 2px; line-height: 1.8; max-height: 45vh; }
    .btn-glass-outline { padding: 16px 12px; letter-spacing: 2px; margin-left: 0; font-size: 0.9rem; font-weight: 400; }
    
    .slide-overlay { background: linear-gradient(to bottom left, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%); }

    /* 👑 方案 D 手機版修正：確保 100% 滿版，留出進度條空間 */
    .hero-tour-carousel {
        gap: 15px; 
        padding-bottom: 25px; /* 手機上多留一點點空間給進度條，避免誤觸 */
    }
    .hero-tour-card {
        flex: 0 0 100%; /* 恢復滿版 */
    }

    /* 主打星字級縮放 */
    .ht-info { padding: 25px; }
    .ht-info h3 { font-size: 1.5rem; margin-bottom: 8px; }
    .ht-subtitle { font-size: 0.9rem; margin-bottom: 15px; line-height: 1.6; }
    .spot-pill { font-size: 0.8rem; padding: 4px 10px; }
    .ht-price-box { gap: 20px; margin-bottom: 25px; flex-direction: column; }
    .price-item .label { font-size: 0.75rem; }
    .price-item .amount { font-size: 1.3rem; }
    .price-item .price-desc { font-size: 0.75rem; }
    .btn-outline { padding: 10px 20px; font-size: 0.9rem; }

    /* 內嵌畫廊改成正方形網格 */
    .ht-mini-gallery { overflow-x: hidden; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 0; }
    .ht-mini-gallery img { width: 100%; height: auto; aspect-ratio: 1/1; }

    /* 嚴選行程卡片字級 */
    .tc-content { padding: 15px; }
    .tc-title { font-size: 1.1rem; }
    .tc-desc { font-size: 0.85rem; }
    .tc-price { font-size: 1rem; }
    .badge-mini { font-size: 0.7rem; padding: 3px 8px; top: 10px; right: 10px; }

    /* 探索世界的一隅字級 */
    .snippet-article { flex-direction: column; gap: 20px; margin-bottom: 40px; }
    .snippet-article:nth-child(even) { flex-direction: column; }
    .snippet-content h3 { font-size: 1.4rem; }
    .snippet-content p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }

    /* 敘日誌卡片字級 */
    .mag-info { padding: 20px 15px 15px; }
    .mag-title { font-size: 1.05rem; }
    .mag-subtitle { font-size: 0.8rem; }
}

/* 手機橫式 (修正白邊與字級) */
@media (max-width: 992px) and (orientation: landscape) {
    .hero-slider { height: 100dvh; min-height: 320px; width: 100vw; }
    .slide-content { writing-mode: horizontal-tb; justify-content: center; align-items: flex-start; text-align: left; padding: 0 40px; }
    .slide-content h1 { font-size: 1.6rem; padding: 8px 15px; margin-bottom: 10px; margin-left: 0; letter-spacing: 1px; }
    .slide-content h1::before { top: 6px; left: -6px; }
    .slide-content p { font-size: 0.85rem; margin-bottom: 10px; margin-left: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .btn-glass-outline { padding: 8px 16px; font-size: 0.85rem; }
    .slide-overlay { background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%); }
}