/* === 強制全站為淺色模式，防止手機深色模式轉黑 === */
:root {
    color-scheme: light;
}

/* 確保 body 背景色有最高優先權 */
body {
    background-color: #F3F0EC !important; /* 加上 !important 避免被瀏覽器複寫 */
    color: #333 !important;               /* 確保文字維持深色，避免被轉成白色 */
    /* ...原有設定... */
}
/* ==========================================================================
   承天中承府 全站樣式 (Refactored by Gemini)
   ========================================================================== */

/* === 全域設定與字體 === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Noto Sans TC', sans-serif; 
    background-color: #F3F0EC;
    color: #333; 
    min-width: 390px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    width: 90vw;
    height: 90vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.25;
    background-image: url('../images/common/BG-cloud.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

@media (min-width: 1024px) {
    body::before {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 100%;
        background-image: url('../images/common/BG-cloud.png'), url('../images/common/BG-cloud.png');
        background-repeat: no-repeat, no-repeat;
        background-position: center left, center right;
        background-size: 650px auto, 650px auto;
    }
}

/* === 導覽列 Header === */
.main-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.main-nav {
    background: rgba(255, 255, 255, 0.50);
    box-shadow: 0px 0px 5px 0px rgba(255, 255, 255, 0.50) inset;
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    border-bottom: 4px solid #E6BA67;
    border-radius: 10px; 
    display: flex;
    justify-content: space-between;
    align-items: center; 
    width: 95%; 
    max-width: 1200px; 
    height: 101px;
    box-sizing: border-box;
    padding: 0 25px;
    
    /* 關鍵修改：將下方邊距設為 0 */
    margin: 20px auto 0; 
}
.nav-logo img {
    width: 84px;
    height: 84px;
    display: block;
}

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === 通用區塊與標題樣式 === */
.hero-section,
.news-section,
.about-section,
.services-section,
.declaration-section {
    padding: 0 20px;
    margin-top: 50px;
    text-align: center;
}

/* === 全新 Banner 樣式 (V3 - 雙圖切換清晰版) === */
.hero-section {
    /* 移除原本的固定高度，改由圖片比例決定，或設定最大高度限制 */
    width: 95%;      
    max-width: 1200px;   
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden; /* 圓角內的圖片若超出去要切掉 */
    position: relative;
    
    /* 移除背景圖片設定，因為我們改用 HTML picture 標籤 */
    background: transparent; 
}

/* 設定圖片的行為 */
.hero-section img.responsive-banner {
    display: block; /* 消除圖片底部的預設白邊 */
    width: 100%;    /* 寬度永遠填滿容器 */
    height: auto;   /* 高度自動，保持圖片原始比例，不變形 */
    
    /* 如果您希望不管圖片多高，都要固定在一個高度範圍內 (例如手機固定300高)，
       才需要加上下面這兩行，否則建議拿掉，讓圖片自然呈現 */
    /* height: 400px; */ 
    /* object-fit: cover; */
}

/* 電腦版微調 */
@media (min-width: 1024px) {
    .hero-section {
        /* 電腦版可以限制一下最大高度，避免圖太大佔據整個螢幕 */
        max-height: 650px; 
    }
    
    .hero-section img.responsive-banner {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 如果有限制高度，這行確保圖片填滿不變形 */
    }
}
.section-title {
    font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
    font-size: clamp(28px, 5vw, 40px);
    color: #333;
    position: relative; 
    display: inline-block; 
    padding: 20px 1.9em; 
    letter-spacing: 0.1em;
    margin: 0 auto 40px;
}

.section-title::before,
.section-title::after {
    content: ''; 
    width: 2em;
    height: 2em;
    display: block;
    position: absolute; 
    top: 50%;
    transform: translateY(-50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.section-title::before {
    left: 0;
    background-image: url('../images/pages/index/title-yuanbao-left.png');
}

.section-title::after {
    right: 0;
    background-image: url('../images/pages/index/title-yuanbao-right.png');
}

/* === 最新消息 News Section === */
.news-card {
    border-radius: 15px;
    border: 2px solid #E6BA67;
    background: rgba(255, 255, 255, 0.50);
    box-shadow: 0px 0px 5px 0px rgba(255, 255, 255, 0.50) inset;
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    margin: 0 auto;
    padding: 20px 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 300px; 
    overflow-y: auto;
}

.news-item {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    gap: 5px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(196, 137, 69, 0.4); 
    cursor: pointer;
    transition: background-color 0.2s;
}

.news-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 14px;
    color: #665434;
}

.news-title {
    margin: 0;
    font-size: clamp(16px, 2.5vw, 18px); 
    letter-spacing: 1.2px;
    text-align: left;
}

.news-avatar {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 130px;
    height: auto;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .news-item {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    .news-title {
        font-size: clamp(16px, 1.2vw, 20px);
    }
}

/* === 關於帥府 About Section === */
.about-section {
    padding-left: 0;
    padding-right: 0;
}

.photo-gallery {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 20px; /* 在此補回左右邊距 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
}

.photo-gallery::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.photo-gallery img {
    border-radius: 10px;
    width: auto;
    flex-shrink: 0;
}

.activity-gallery img {
    height: 200px;
}

.about-text {
    max-width: 650px;
    margin: 30px auto;
    padding: 0 20px; /* 在此補回左右邊距 */
    font-size: clamp(16px, 2.5vw, 18px);
    color: #231815;
    line-height: 1.8;
    letter-spacing: 0.1em;
}

.deity-list-no-shrine {
    font-size: 16px;
    margin-top: 30px;
}

.font-fallback {
    font-family: "Noto Sans TC", sans-serif;
}

@media (min-width: 768px) {
    .activity-gallery img {
        height: 350px;
    }
}

/* === 陪祀神明輪播 Deity Carousel === */
.deity-carousel {
    width: 100%; /* 手機版滿版 */
    margin: 40px auto; 
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.deity-grid-track {
    display: flex; 
    width: fit-content; 
    gap: 30px; 
    animation: marquee 60s linear infinite;
}

.deity-grid-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}

.deity-card {
    text-align: center;
    width: 220px;
    flex-shrink: 0;
}

.deity-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.deity-info {
    margin-top: 15px;
}

.deity-info p {
    margin: 5px 0;
    font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
}

.temple-name {
    font-size: clamp(22px, 3vw, 24px);
    color: #C48945;
}

.deity-name {
    font-size: clamp(18px, 2.5vw, 25px);
    color: #231815;
}

@media (min-width: 1024px) {
    /* 輪播在桌機上改為橫向滿版 */
    .about-section {
        max-width: none;
    }
    .deity-carousel {
        width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
    /* 卡片變小，間距縮減，一次塞更多張 */
    .deity-grid-track {
        gap: 20px;
    }
    .deity-card {
        width: 160px;
    }
    .deity-card img {
        height: 240px;
    }
}

/* === 服務項目 Services Section === */
.services-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.service-image {
    width: 264px;
    height: 264px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 全域通用按鈕 */
.btn {
    display: inline-block;
    height: 42px;
    line-height: 42px;
    padding: 0 20px;
    border-radius: 15px;
    color: white;
    text-decoration: none;
    letter-spacing: 1.7px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease-out;
    border: none; /* <-- 新增這一行來移除按鈕的預設黑框 */

}

.btn:hover {
    transform: scale(1.05);
}

.btn--brown {
    background: rgba(196, 137, 69, 0.65);
    box-shadow: -2px 2px 3px 0px #FFF inset, 2px -2px 3px 0px rgba(0, 0, 0, 0.25) inset;
}

@media (min-width: 768px) {
    .service-image {
        width: 330px;
        height: 330px;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }
}

/* === 帥府聲明 Declaration Section === */
.declaration-box {
    border-radius: 15px;
    border: 2px solid #E6BA67;
    background: rgba(255, 255, 255, 0.50);
    box-shadow: 0px 0px 5px 0px rgba(255, 255, 255, 0.50) inset;
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    width: 95%;
    margin: 0 auto;
}

.action-buttons {
    margin-top: 40px;
    text-align: center; /* 也可以順便加上置中 */
    display: flex; /* 讓按鈕並排且有間距 */
    justify-content: center;
    gap: 20px;
}

.declaration-text {
    width: 100%;
    font-size: clamp(16px, 2.5vw, 18px);
    color: #231815;
    line-height: 1.8;
    letter-spacing: 0.1em;
    text-align: left;
}

.declaration-text ol {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.declaration-text li {
    margin-bottom: 1.5em;
}

.declaration-text li:last-child {
    margin-bottom: 0;
}

.declaration-avatar {
    height: 200px;
    width: auto;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .declaration-box {
        flex-direction: row;
        align-items: flex-start;
        width: 95%;
        max-width: none;
        padding: 40px;
    }
}

/* === 頁尾 Footer === */
.main-footer {
    padding: 4rem 0 2rem 0; /* */
    margin-top: 5px;
    border-top: 4px solid #E6BA67; /* 這是您設計中已有的上方線條  */
    border-bottom: 4px solid #E6BA67; /* 這是新增的下方線條 */
    background: #3E3E3E;
}


.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    gap: 2rem;
    position: relative; /* 關鍵：讓絕對定位依據這個容器 */
    max-width: 1200px; /* 與導覽列對齊 */
    margin: 0 auto;
}

/* 左欄：宮廟資訊 */
.footer-col-left {
    flex: 1 1 0;
    color: #fff;
    position: relative;
    z-index: 2; /* 確保文字在元寶之上 */
}

.footer-title {
    font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
    font-size: 30px;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.footer-info p {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    margin: 5px 0;
    opacity: 0.9;
}

/* 中欄：元寶圖 (桌機版置中) */
.footer-col-center {
    flex: 0 0 140px; /* 固定寬度不壓縮 */
}

.center-yuanbao {
    width: 120px;
    height: auto;
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1; /* 在文字之下 */
}

/* 右欄：社群與版權 */
.footer-col-right {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.7rem;
    min-width: 180px;
    position: relative;
    z-index: 2; /* 確保文字在元寶之上 */
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social img {
    height: 32px;
    width: auto;
    transition: transform 0.2s;
}

.footer-social a:hover img {
    transform: scale(1.15);
}

.footer-copyright {
    color: #fff;
    opacity: .7;
    font-size: 1rem;
    margin-top: 0.3rem;
    text-align: right;
}

/* Footer 手機版響應式 */
@media (max-width: 991px) {
    .main-footer {
        padding: 2rem 1rem 1rem 1rem; /* */
    }
    .footer-content {
        flex-direction: column;
        gap: 1.2rem;
        padding: 0;
    }
    .footer-col-left,
    .footer-col-right {
        width: 100%;
        text-align: center;
        align-items: center;
    }
    .footer-social img {
        height: 41px;  /* 想要多大就調這裡 */
    }
    .center-yuanbao {
        position: static; /* 還原定位 */
        transform: none;
        margin: 0.5rem auto 1rem auto;
    }
}

/* === 回到頂端 Back to Top Button === */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 85px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid #C48945;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #C48945;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s ease-out;
}

.back-to-top-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 1);
}

/* === 公告彈窗 Modal === */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0px 0px 5px 0px rgba(255, 255, 255, 0.50) inset;
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    padding: 40px 30px;
    width: 90%;
    max-width: 450px;
    position: relative;
    /* --- 以下為新增的樣式 --- */
    max-height: 80vh; /* 設定最大高度為視窗的 80% */
    display: flex; /* 使用 Flexbox 來幫助內部佈局 */
    flex-direction: column; /* 讓標題和內文垂直排列 */
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #C48945;
    border: 1px solid #D9B88A;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    font-size: 20px;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.modal-date { font-size: 14px; color: #666; }
.modal-title { font-size: 22px; margin-top: 5px; }
.modal-body {
    margin-top: 20px;
    line-height: 1.8;
    /* --- 以下為新增的樣式 --- */
    overflow-y: auto; /* 當內容垂直溢出時，自動顯示捲軸 */
    padding-right: 15px; /* 增加一點右邊距，避免捲軸跟文字黏在一起 */
}
@media (min-width: 1024px) {
    .news-card {
        width: 70%;
        max-width: 900px; /* 您可以依據設計需求調整最大寬度 */
    }
}
/* === 手機版 Overlay 選單 (優化版) === */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 使用 100dvh (動態視窗高度) 避免手機瀏覽器網址列遮擋問題 */
    height: 100dvh; 
    
    /* [美觀升級] 背景策略：光暈漸層 + 雜訊紋理 (營造高級紙質感) */
    background-color: #FDF6E9;
    background-image: 
        /* 1. 淡淡的雜訊紋理 (可找一張透明的 noise png 或用 css 生成) */
        url('../images/common/noise-texture.png'), 
        /* 2. 您的神聖光暈 */
        radial-gradient(circle at top right, rgba(253, 246, 233, 0.95) 0%, rgba(243, 240, 236, 0.98) 60%, rgba(230, 186, 103, 0.95) 150%);
    
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay; /* 讓紋理與漸層融合 */

    z-index: 9999;
    padding: 80px 40px 40px 40px; /* 上方留多一點給關閉按鈕 */
    box-sizing: border-box;

    /* [效能關鍵] 使用 3D Transform 啟動 GPU 加速 */
    transform: translate3d(100%, 0, 0); 
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1); /* 調整貝茲曲線，讓滑入有一種「煞車」的高級感 */
    
    /* 彈性佈局維持不變 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    
    /* [效能] 告訴瀏覽器這個元素會變化，請提前準備 */
    will-change: transform;
}

/* 開啟狀態 */
.mobile-nav-overlay.is-visible {
    transform: translate3d(0, 0, 0);
}

/* [新增] 當選單開啟時，Body 禁止滾動的 Class */
body.menu-open {
    overflow: hidden;
    height: 100vh;
    touch-action: none; /* 禁止觸控滾動 */
}

/* 關閉按鈕 */
.overlay-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: #FFF;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* 選單連結列表 */
.overlay-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.overlay-nav-links li {
    margin-bottom: 30px;
}

.overlay-nav-links a {
    text-decoration: none;
    font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
    font-size: 30px; /* 放大字體以利點擊 */
    color: #4b2c1c;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.overlay-nav-links a:active {
    color: #ddbd26;
}

/* 元帥頭像 */
.overlay-avatar {
    max-width: 230px; /* 限制頭像最大寬度 */
    height: auto;
}

.custom-link-title {
  /* 字體設定 */
  font-family: 'Noto Sans TC', sans-serif; /* 改回 Noto Sans TC */
  font-size: 16px;       /* 設定一個適中的字體大小 */
  font-weight: 400;      /* 加粗以示強調 */
  color: #FFFFFF;        /* 維持白色 */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); /* 加上細微陰影增加質感 */

  /* 間距設定，讓它和下方的 icon 貼齊 */
  margin: 0 0 0 0;    /* 移除左右和上方的 margin，只保留 10px 的下方間距 */
  padding: 0.5px;            /* 移除所有內距 */
}
.mobile-nav-overlay .custom-link-title {
    margin-top: 15px;    /* 調整標題與上方頭像的距離 */
    margin-bottom: 1px; /* 調整標題與下方 icon 的距離 */
}


/* 底部社群連結 */
.overlay-social {
    display: flex;
    justify-content: center;
    gap: 23px; /* 依照您的要求設定間距 */
    width: 100%; /* 確保容器佔滿寬度 */
    margin-bottom: 30px;

}

.overlay-social img {
    height: 50px;
}
/* === 回應式導覽列樣式 (修正版) === */

/* 預設狀態 (手機版) */
.nav-links-desktop {
    display: none; /* 電腦版選單在手機上預設隱藏 */
}

/* 漢堡選單在手機上預設顯示 (您原本的 .nav-toggle 樣式已經是 flex，所以這裡不用再寫) */


/* --- 媒體查詢：當螢幕寬度大於或等於 1024px 時 (電腦版) --- */
@media (min-width: 1024px) {
    /* 隱藏手機版的漢堡按鈕 */
    .nav-toggle {
        display: none;
    }

    /* 顯示電腦版的文字選單 */
    .nav-links-desktop {
        display: flex; /* 讓列表項目水平排列 */
        align-items: center; /* 垂直置中 */
        gap: 28px; /* 連結之間的間距 */
        list-style: none; /* 移除項目符號 */
        margin: 0;
        padding: 0;
    }

    /* 電腦版文字連結樣式 */
    .nav-links-desktop a {
        text-decoration: none;
        font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
        font-size: 26px; /* 您要求的字體大小 */
        color: #4b2c1c; /* 您要求的字體顏色 */
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); /* 您要求的陰影 */
        transition: color 0.3s ease, transform 0.3s ease; /* 平滑過渡效果 */
        display: inline-block; /* 讓 transform 生效 */
    }

    /* 電腦版文字連結滑鼠懸停效果 */
    .nav-links-desktop a:hover {
        color: #ddbd26;
        transform: translateY(-2px); /* 向上浮動一點 */
    }
}
/* === 修正錨點連結被導覽列遮擋的問題 === */
.news-section,
.about-section,
.services-section,
.declaration-section {
    /* 這個數值，就是我們為頂部導覽列預留的空間 */
    /* 您可以根據導覽列的實際高度微調這個數值 */
    scroll-margin-top: 130px; 
}
    /*收驚*/
    /* --- 最終簡化版樣式 --- */
    .shoujing-page-wrapper {
        padding: 40px 20px;
        max-width: 1200px;
        margin: 0 auto;
    }
    .shoujing-title-wrapper {
        text-align: center;
        margin-bottom: 40px;
    }
    
    /* 內容區：圖片與文字水平排列 */
    .shoujing-process-flex-container {
        display: flex;
        align-items: center;
        gap: 30px;
        flex-wrap: nowrap
    }
    .shoujing-process-image-wrapper {
        flex: 0 0 150px;
    }
    .shoujing-process-image-wrapper img {
        width: 100%;
        height: auto;
    }
    .shoujing-process-steps {
        text-align: left;
    }
    .step-item-shoujing { margin-bottom: 25px; }
    .step-item-shoujing:last-child { margin-bottom: 0; }
    .step-item-shoujing h3 { font-size: clamp(18px, 4vw, 22px); color: #C48945; margin: 0 0 8px 0; }
    .step-item-shoujing p { font-size: clamp(14px, 3vw, 16px); line-height: 1.7; margin: 0 0 12px 0; }

    /* --- ↓↓↓ 唯一的彈窗樣式 (電腦與手機共用) ↓↓↓ --- */
    #info-modal-container {
        display: none; /* 預設隱藏 */
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: 1000;
        justify-content: center;
        align-items: center;
        background: rgba(255, 255, 255, 0.70);
        backdrop-filter: blur(7.5px);
    }
    #info-modal-container.is-visible {
        display: flex;
    }
    
    /* 文字型彈窗的內容樣式 */
    .info-modal-content {
        position: relative; background: #fff; border-radius: 15px;
        padding: 40px 30px; width: 90%; max-width: 450px; max-height: 80vh;
        overflow-y: auto; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        color: #333; line-height: 1.8; letter-spacing: 0.1em;
    }
    .info-modal-content h3 { text-align: center; margin-top: 0; margin-bottom: 20px; font-size: 20px; }
    .info-modal-content ol { padding-left: 20px; }
    .info-modal-content li { margin-bottom: 1em; }
    .modal-close-btn {
        position: absolute; top: 15px; right: 15px; background: #C48945;
        border: 1px solid #D9B88A; border-radius: 50%; width: 35px; height: 35px;
        color: white; font-size: 20px; line-height: 35px; text-align: center;
        cursor: pointer; padding: 0;
    }

    /* 圖片型彈窗的特殊樣式 (燈箱效果) */
    .image-modal {
        width: 100vw; height: 100vh;
        max-width: none; max-height: none;
        padding: 25px;
        background: rgba(0,0,0,.82);
        overflow: hidden;
    }
    .image-modal img {
        max-width: 100%; max-height: 100%;
        object-fit: contain;
    }
    .image-modal .modal-close-btn {
        position: fixed; top: 20px; right: 20px;
        z-index: 2000; width: 40px; height: 40px;
        font-size: 28px; line-height: 40px;
    }


    /* css.txt */

/* === 收驚頁面 - 電腦版右側資訊面板 === */
#desktop-info-panel {
    /* 預設在手機上完全隱藏 */
    display: none; 
}

@media (min-width: 1024px) {
    #desktop-info-panel {
        /* 在電腦版上顯示為一個區塊 */
        display: block; 

        /* 讓它佔據剩餘空間，設定最小寬度以防被過度擠壓 */
        flex: 0 0 500px;
        min-width: 300px; 

        /* 讓它在內容超出時可以滾動，且有自己的高度 */
        align-self: stretch; 
        max-height: 480px; /* 根據流程圖高度估算，可微調 */
        overflow-y: auto;

        /* 外觀樣式 */
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid #D9B88A;
        border-radius: 15px;
        padding: 30px 25px;

        /* 文字樣式 */
        color: #333; 
        line-height: 1.8; 
        letter-spacing: 0.1em;

        /* 過渡效果 */
        transition: all 0.3s ease;
    }

    #desktop-info-panel h3 {
        text-align: center; 
        margin-top: 0; 
        margin-bottom: 20px; 
        font-size: 20px; 
    }

    #desktop-info-panel ol {
        padding-left: 20px; 
    }

    #desktop-info-panel li {
        margin-bottom: 1em; 
    }
}
    /* === FAQ 頁面 - 單一問答卡片樣式 === */
.faq-item-card {
    /* 複製 declaration-box 的外觀 */
    border-radius: 15px; /* */
    border: 2px solid #E6BA67; /* */
    background: rgba(255, 255, 255, 0.50); /* */
    box-shadow: 0px 0px 5px 0px rgba(255, 255, 255, 0.50) inset; /* */
    backdrop-filter: blur(7.5px); /* */
    -webkit-backdrop-filter: blur(7.5px); /* */
    
    /* 內部與外部空間 */
    padding: 20px 25px;
    margin-bottom: 20px; /* 每張卡片之間的間距 */

    /* 【關鍵】處理自動換行 */
    overflow-wrap: break-word;
    word-wrap: break-word; /* 舊版瀏覽器相容 */
    word-break: break-all; /* 確保在任何點都可以斷行 */
}

.faq-item-card:last-child {
    margin-bottom: 0; /* 最後一張卡片不用底部間距 */
}

/* 卡片內的 Q&A 標題與內容樣式 */
.faq-item-card .faq-q {
    font-size: 1.1em;
    font-weight: bold;
    color: #C48945;
    margin: 0 0 10px 0;
}

.faq-item-card .faq-a {
    margin: 0;
    line-height: 1.8;
}
/* === 手工香品頁面 Banner 樣式 (最終版) === */
.incense-hero-section {
    /* 手機上的預設高度 */
    height: 300px;
    width: 100%;

    /* 關鍵：設定新的背景圖片 */
    background-image: url('../images/pages/incense/incenseimage.png');

    /* 讓圖片永遠填滿容器，並以中心點對齊 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 當螢幕寬度大於 1024px (電腦版) 時，使用 600px 高度 */
@media (min-width: 1024px) {
    .incense-hero-section {
        height: 600px;
    }
}

/* (這裡保留 incense-actions 的樣式，因為它跟 Banner 無關且是需要的) */
.incense-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 20px;
}
/* === 新增：Instagram 嵌入樣式 === */
.instagram-embed-wrapper {
  max-width: 540px;  /* Instagram 官方建議的最大寬度 */
  width: 100%;       /* 在小螢幕上會自動縮小 */
  margin: 40px auto; /* 上下保留 40px 間距，並水平置中 */
  border-radius: 8px;  /* 加上一點圓角讓視覺更柔和 */
  overflow: hidden;    /* 確保內容不會超出圓角範圍 */
}
/* === 進場動畫遮罩層樣式 (擴散版) === */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #F3F0EC;
    z-index: 99999;
    
    display: flex;
    justify-content: center;
    align-items: center;

    /* 設定遮罩層(背景)的轉場：1.5秒內慢慢變透明 */
    transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
}

#intro-overlay img {
    width: 80%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    
    /* 這裡設定圖片的轉場：1.5秒內變形(變大) */
    transition: transform 1.5s ease-in-out;
    
    /* 初始狀態：正常大小 (scale 1) */
    transform: scale(1);
}

/* === 當 JS 加上 fade-out 這個 class 時觸發的動畫 === */
#intro-overlay.fade-out {
    opacity: 0;             /* 背景變透明 */
    visibility: hidden;     /* 隱藏 */
    pointer-events: none;   /* 滑鼠穿透 */
}

#intro-overlay.fade-out img {
    /* 關鍵在這裡：讓圖片放大 25 倍！(看起來就像擴散到全螢幕) */
    transform: scale(25);   
}
/* === FAQ 搜尋框樣式 === */
.search-container {
    text-align: center;
    margin-bottom: 30px; /* 與下方問題列表保持距離 */
    padding: 0 20px;
}

.faq-search-input {
    width: 100%;
    max-width: 500px; /* 限制最大寬度，跟你的新聞卡片差不多寬 */
    padding: 10px 15px;
    
    /* 你的指定樣式 */
    border: 1px solid #E6BA67; /* 細的金邊框 */
    background-color: transparent; /* 透明背景 */
    font-size: 12px; /* 指定字體大小 */
    color: #333; /* 輸入文字顏色 */
    
    border-radius: 50px; /* 圓角設計，比較柔和 */
    outline: none; /* 移除點擊時的藍框 */
    transition: all 0.3s ease;
}

.faq-search-input:focus {
    box-shadow: 0 0 5px rgba(230, 186, 103, 0.5); /* 聚焦時發點光 */
}

/* 設定 placeholder (提示字) 的顏色 */
.faq-search-input::placeholder {
    color: #999; /* 灰色底字 */
    font-weight: bold;
}

/* === 信徒回饋頁專屬：側邊懸浮按鈕 (長條圖修正版) === */
.feedback-floating-btn {
    position: fixed;
    right: 0;              /* 貼齊最右側 */
    bottom: 85%;           /* 垂直位置中間偏下 */
    width: 130px;          /* 固定像素寬度，確保長條圖夠大 */
    height: auto;          /* 高度自動 */
    z-index: 9999;
    cursor: pointer;
    
    /* 閃爍動畫：10秒一次循環 */
    animation: flash-twice 10s infinite;
    
    /* 加上陰影與互動 */
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.feedback-floating-btn:hover {
    transform: scale(1.05); /* 滑鼠移過去稍微放大 */
}

.feedback-floating-btn img {
    width: 100%;
    display: block;
}

/* 定義閃爍動畫 */
@keyframes flash-twice {
    0%   { opacity: 1; }
    2%   { opacity: 0.5; } /* 變暗 */
    4%   { opacity: 1; }   /* 變亮 */
    6%   { opacity: 0.5; } /* 變暗 */
    8%   { opacity: 1; }   /* 變亮 */
    100% { opacity: 1; }   /* 休息 */
}

/* 手機版調整 */
@media (max-width: 768px) {
    .feedback-floating-btn {
        width: 100px; /* 手機版寬度 */
        bottom: 50%;
    }
}

/* === 首頁 YouTube 影片響應式設定 === */
.video-responsive-wrapper {
    position: relative;
    width: 100%; /* 寬度跟隨父容器 */
    max-width: 800px; /* 限制最大寬度，避免在電腦版過大，可自行調整 */
    padding-bottom: 56.25%; /* 關鍵：設定 16:9 比例 (9/16 = 0.5625) */
    height: 0;
    margin: 0 auto 30px auto; /* 上0、左右置中、下30px間距 */
    overflow: hidden;
    border-radius: 10px; /* 加上圓角比較好看 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* 加上一點陰影 */
}

.video-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* =========================================
   新增：電腦版下拉選單 (Dropdown Menu)
   ========================================= */
/* 母選項容器 */
.nav-links-desktop .dropdown {
    position: relative;
    display: inline-block;
}

/* 下拉按鈕樣式 */
.nav-links-desktop .dropbtn {
    cursor: pointer;
    /* 這裡繼承 nav-links-desktop a 的樣式，但加上箭頭指示 */
}

/* 下拉選單內容 (預設隱藏) */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* 出現在按鈕正下方 */
    left: 50%;
    transform: translateX(-50%); /* 水平置中 */
    background-color: rgba(255, 255, 255, 0.95);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #E6BA67;
    z-index: 1000;
    padding: 10px 0;
    text-align: center;
}

/* 下拉選單連結 */
.dropdown-content a {
    color: #333 !important; /* 覆蓋原本白色設定 */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 18px !important; /* 比主選單小一點 */
    font-family: 'Noto Sans TC', sans-serif !important; /* 子選單用清晰字體 */
    text-shadow: none !important;
}

/* 滑鼠移過連結變色 */
.dropdown-content a:hover {
    background-color: #fdf6e9;
    color: #C48945 !important;
}

/* 滑鼠移入母選項時顯示下拉 */
.dropdown:hover .dropdown-content {
    display: block;
}

/* =========================================
   新增：手機版選單層級 (Mobile Hierarchy)
   ========================================= */
/* 小標題 (不可點擊) */
.mobile-group-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 16px;
    color: #888;
    margin-bottom: 15px !important;
    margin-top: 10px;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    display: inline-block;
    padding-bottom: 5px;
}

/* 子項目縮排 */
.mobile-sub-item {
    margin-bottom: 20px !important; /* 比主項目稍微緊湊一點 */
    padding-left: 0; /* 視覺上不做太多縮排，改用字體大小區分 */
}

.mobile-sub-item a {
    font-size: 24px !important; /* 比主項目(30px)小 */
    color: #6d4c41 !important; /* 顏色稍微深一點區隔 */
}
/* =========================================
   收驚紅紙疏文樣式 (V3 - 自動拓寬版)
   ========================================= */

/* 1. 自動偵測：如果彈窗內有紅紙，強制把彈窗變寬 */
.modal-content:has(.red-paper-visual) {
    max-width: 1000px !important; /* 電腦版改為 900px 寬，大氣！ */
    width: 95% !important;       /* 手機版佔 95% 寬 */
    padding: 0 !important;       /* 移除預設內距，讓紅紙滿版 */
    background: transparent !important; /* 讓背景透明，只秀紅紙 */
    box-shadow: none !important; /* 移除原本彈窗陰影 */
    border: none !important;     /* 移除邊框 */
}

/* 2. 紅紙本體設定 */
.red-paper-visual {
    /* --- 核心設定：直書模式 --- */
    writing-mode: vertical-rl; /* 直書：行從右到左 */
    text-orientation: mixed;   /* 中文正立 */
    
    /* --- 排版佈局 --- */
    display: flex;
    /* 直書模式下的 column-reverse = 從左到右排列區塊 */
    /* 這樣「日期」會在最左邊，「資料」會在最右邊 */
    flex-direction: column-reverse; 
    
    /* 讓兩區塊分別靠左與靠右，中間留白 */
    justify-content: space-between; 
    
    /* --- 外觀與尺寸 --- */
    background-color: #D43636;
    background-image: linear-gradient(45deg, #D43636 25%, #c0392b 25%, #c0392b 50%, #D43636 50%, #D43636 75%, #c0392b 75%, #c0392b 100%);
    background-size: 20px 20px;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5); /* 更有立體感 */
    border-radius: 8px;
    
    width: 100%;           /* 跟隨彈窗變寬 */
    min-height: 300px;     /* 直書的高度 (即文字長度) */
    max-height: 80vh;      /* 防止太高超出螢幕 */
    
    padding: 15px 15px;    /* 上下左右留白 */
    box-sizing: border-box;
    
    color: #000;
    font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
    
    /* 防止出現捲軸，強制內容在範圍內 */
    overflow: hidden; 
}

/* 3. 內容區塊 (右側：姓名、地址...) */
.red-paper-content {
    display: flex;
    flex-direction: column; /* 內部行：從右到左 */
    gap: 15px;              /* 行距加寬，更易閱讀 */
    font-size: 15px;        /* 字體加大 */
    letter-spacing: 4px;    /* 字距加大 */
    height: 100%;
}

/* 4. 每一行的樣式 */
.red-paper-row {
    white-space: nowrap;    /* 強制不換行 */
    padding-left: 10px;
    border-left: 1px solid rgba(0,0,0,0.1); /* 淡淡的分隔線 */
}

/* 5. 日期區塊 (左側) */
.red-paper-date {
    font-size: 20px;
    color: #333;
    white-space: nowrap;
    align-self: flex-end;   /* 視覺上的下方 */
    margin-left: 20px;      /* 與邊緣的距離 */
}

/* --- 手機版 RWD 調整 --- */
@media (max-width: 768px) {
    .red-paper-visual {
        min-height: 400px; /* 手機版不需要那麼長 */
        padding: 30px 20px;
    }
    .red-paper-content {
        font-size: 13px;   /* 手機字體縮小 */
        gap: 5px;         /* 行距縮小 */
    }
    .red-paper-date {
        font-size: 10px;
    }
}
/* === 手機版 Overlay 選單樣式 (極速動畫版) === */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* [改動1] 移除圖片，改用 CSS 放射漸層 */
    /* 這會營造出一種神聖的光暈感，但完全不吃流量 */
    background: radial-gradient(circle at top right, #FDF6E9 0%, #F3F0EC 60%, #E6BA67 150%);
    
    z-index: 9999;
    padding: 60px 40px 25px 40px;
    box-sizing: border-box;

    /* 預設狀態：隱藏 (移出畫面) */
    transform: translateX(100%);
    /* 這裡只讓背景做平滑移動 */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* 開啟狀態 */
.mobile-nav-overlay.is-visible {
    transform: translateX(0);
}

/* [改動2] 關閉按鈕優化 - 滑鼠移過去會旋轉 */
.overlay-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: #4b2c1c; /* 改深色，因為背景變淺了 */
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s;
}

.overlay-close-btn:hover {
    transform: rotate(90deg); /* 互動感 */
    color: #C48945;
}

/* [改動3] 選單連結列表 - 準備做動畫 */
.overlay-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* 列表項目預設狀態：往下沉一點點 + 透明 */
.overlay-nav-links li {
    margin-bottom: 25px;
    opacity: 0; 
    transform: translateY(20px);
    transition: none; /* 關閉時不需要動畫，直接消失 */
}

/* [關鍵動畫] 當選單開啟時(is-visible)，項目一個個冒出來 */
.mobile-nav-overlay.is-visible .overlay-nav-links li {
    animation: fadeInUp 0.5s forwards; /* 執行進場動畫 */
}

/* 利用 nth-child 設定時間差 (瀑布效果) */
.mobile-nav-overlay.is-visible .overlay-nav-links li:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-overlay.is-visible .overlay-nav-links li:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-overlay.is-visible .overlay-nav-links li:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-overlay.is-visible .overlay-nav-links li:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav-overlay.is-visible .overlay-nav-links li:nth-child(5) { animation-delay: 0.3s; }
.mobile-nav-overlay.is-visible .overlay-nav-links li:nth-child(6) { animation-delay: 0.35s; }

/* 定義進場動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overlay-nav-links a {
    text-decoration: none;
    font-family: 'LXGW WenKai TC', 'KaiTi', '標楷體', serif;
    font-size: 32px;
    color: #4b2c1c; /* 深咖啡色，對比米色背景 */
    position: relative;
    display: inline-block;
}

/* 連結 hover 效果：下方長出一條金線 */
.overlay-nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #C48945;
    transition: all 0.3s ease;
}

.overlay-nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* 底部社群連結 */
.overlay-social {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
    opacity: 0; /* 預設隱藏 */
}

/* 社群圖示最後才出來 */
.mobile-nav-overlay.is-visible .overlay-social {
    animation: fadeInUp 0.5s forwards;
    animation-delay: 0.5s; /* 等文字都出來後再出來 */
}

.overlay-social img {
    height: 40px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)); /* 輕微陰影增加質感 */
}