/* --- 基礎設定與字體 --- */
:root {
    --color-dark-bg: #1a1a1a;
    --color-text-light: #f4f4f4;
    --color-accent-gold: #FFD700; /* 金色點綴 */
    --color-accent-hover: #ffc400; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    background-color: var(--color-dark-bg);
    color: var(--color-text-light);
    line-height: 1.6;
}

a {
    color: var(--color-accent-gold);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-accent-hover);
}

/* --- 區塊標題 --- */
h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-accent-gold);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 英雄區 (Hero) --- */

/* **** 新增：英雄區社群連結容器樣式 **** */
.hero-social-links {
    margin-top: 30px;
    /* 讓 Logo 和社群圖示之間有足夠空間 */
    margin-bottom: 20px; 
}

/* **** 新增：英雄區社群圖示大小和間距 **** */
.hero-social-links a {
    /* 繼承全域 a 連結的顏色和過渡效果 */
    font-size: 2.2em; /* 將字體放大！這就是圖示的大小 */
    margin: 0 15px; /* 增加圖示之間的間距 */
}

.hero-social-links a:hover {
    transform: scale(1.1);
}

.hero {
    height: 100vh;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* 啟用滾動視差，圖片路徑需在 HTML 中設定或此處替換 */
    background-attachment: fixed; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 黑色半透明遮罩 */
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* Hero 快速定位列 */
.quick-anchors {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px auto 0;
  max-width: 720px;
  padding: 0 12px;
}
.qa-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  transition: all .2s ease;
}
.qa-link:hover { border-color: #fff; background: rgba(255,255,255,.15); }

/* 捲動定位微調，避免被上方區塊遮住 */
#ambience, #food, #cocktails { scroll-margin-top: 80px; }

@media (max-width: 480px) {
  .qa-link { font-size: 13px; padding: 7px 12px; }
  #ambience, #food, #cocktails { scroll-margin-top: 72px; }
}

/* **** Logo 圖片樣式 (加入旋轉動畫) **** */
.hero-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--color-accent-gold);
    margin-top: 30px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);

    /* **** 新增動畫屬性 **** */
    animation: spin 8s linear infinite; /* 動畫名稱, 持續時間, 速度曲線, 重複次數 */
}

/* **** 定義旋轉動畫 @keyframes **** */
@keyframes spin {
    0% { transform: rotate(0deg); } /* 從 0 度開始 */
    100% { transform: rotate(360deg); } /* 轉到 360 度 (一圈) */
}

/* --- 英雄區 (Hero) --- */
.hero {
    height: 100vh;
    /* 新增或修改此行，指向您的圖片路徑 */
    background-image: url('assets/hero_background.jpg'); 
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-attachment: fixed; /* 保持滾動視差效果 */
}

.tagline {
    font-size: 1.5em;
    font-style: italic;
    margin-bottom: 30px;
}

/* --- CTA 按鈕 --- */
.cta-button, .online-reservation-cta, .cta-button-small {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
}

.cta-button:hover, .online-reservation-cta:hover {
    background-color: var(--color-accent-gold);
    color: var(--color-dark-bg);
}

.cta-button-small {
    padding: 8px 15px;
    font-size: 0.9em;
    margin-top: 10px;
}

.pulse-effect {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* --- 空間氛圍 (Gallery) --- */
.gallery {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-item {
    /* 調整為約 23% 的寬度，讓四張圖能在一行顯示，並考慮間距 */
    flex: 1 1 calc(25% - 15px); 
    text-align: center;
    overflow: hidden;
}

/* --- 空間氛圍區塊的總結文字 --- */
.ambiance-text {
    /* 新增或修改此行，設定為兩端對齊 */
    text-align: justify; 

    font-size: 1.1em;
    line-height: 1.8;
    margin: 40px auto 0;
    max-width: 800px; /* 限制寬度讓文字不至於太長 */
    padding: 0 20px;
}

/* --- 響應式設計 (RWD) --- */
@media (max-width: 1024px) {
    /* 在較大平板上，改為兩欄顯示 */
    .gallery-item {
        flex: 1 1 calc(50% - 10px);
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    opacity: 0.8;
    transition: opacity 0.5s, transform 0.5s;
}

.gallery-item img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-item p {
    margin-top: 10px;
    color: var(--color-text-light);
    font-style: italic;
}

/* --- 菜單亮點 --- */
.menu-highlights {
    /* 關鍵：設定為不換行，允許內容超出 */
    display: flex;
    flex-wrap: nowrap; /* 確保卡片保持在同一行 */

    /* 關鍵：允許水平滑動 */
    overflow-x: auto;

    /* 關鍵：在 iOS 裝置上啟用平滑慣性滑動 */
    -webkit-overflow-scrolling: touch;
    
    /* **** 新增：設定預設游標為可抓取 (靜態時) **** */
    cursor: grab; 
    
    /* **** 新增：啟用平滑捲動，與 JS 搭配使用效果更佳 **** */
    scroll-behavior: smooth;

    gap: 30px;
    justify-content: flex-start; /* 讓卡片從左邊開始排列 */
    margin-bottom: 30px;
    padding-bottom: 20px; /* 增加底部內邊距，避免滑動條貼住卡片 */

    /* 可選：隱藏標準滑動條，使介面更簡潔（僅在部分瀏覽器生效） */
    scrollbar-width: none; /* Firefox */
}

/* 隱藏 Chrome, Safari 和 Opera 的滑動條 */
.menu-highlights::-webkit-scrollbar {
    display: none;
}

/* **** 新增：滑鼠拖曳時的游標樣式 **** */
/* 這個 class 會由 script.js 在滑鼠按下時加入 */
.menu-highlights.active-drag {
    cursor: grabbing;
    user-select: none; /* 防止在拖曳時選中文字 */
}


.menu-card {
    background-color: #252525;
    padding: 20px;
    border-radius: 8px;
    
    /* 關鍵：固定卡片寬度，防止 flex 擠壓它們 */
    flex: 0 0 280px;

    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border-top: 3px solid var(--color-accent-gold);
}

.menu-card img {
    width: 100%;
    /* 1. 調整 max-height，讓圖片有更多空間來顯示完整內容 */
    max-height: 250px; /* 從 200px 增加到 250px */
    
    /* 2. 確保圖片的內容被「包含」在容器內，而不是「覆蓋」並裁切 */
    object-fit: contain; 
    
    border-radius: 4px;
    margin-bottom: 15px;
}

.menu-card h3 {
    color: var(--color-accent-gold);
    margin-bottom: 5px;
}

.full-menu-link {
    display: block;
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
    text-transform: uppercase;
}

/* --- 聯絡資訊 --- */
/* --- 聯絡資訊 --- */
/* **** 新增：聯絡區塊背景圖片樣式 **** */
.section.contact {
    background-image: url('assets/contact_background.jpg'); /* 指向您的背景圖片路徑 */
    background-size: cover;          /* 圖片覆蓋整個區塊 */
    background-position: center center; /* 圖片置中 */
    background-attachment: fixed;    /* 啟用滾動視差效果 */
    position: relative;              /* 為 overlay 做定位參考 */
    color: var(--color-text-light);  /* 確保文字顏色在深色背景下可讀 */
    padding-top: 100px;              /* 增加上下內邊距，避免內容太擠 */
    padding-bottom: 100px;
}

/* **** 新增：為背景圖片增加遮罩層 (提高文字可讀性) **** */
.section.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 黑色半透明遮罩 (濃度可調整) */
    z-index: 1; /* 確保遮罩在背景圖之上，內容之下 */
}

/* **** 確保聯絡資訊格線內容在遮罩之上 **** */
.contact-info-grid, 
.section.contact h2 {
    position: relative; /* 讓這些元素在遮罩層之上 */
    z-index: 2;
}


/* **** 調整聯絡資訊方塊的背景，讓文字更清晰 **** */
.info-block {
    text-align: center;
    padding: 20px;
    background-color: rgba(37, 37, 37, 0.85); /* 原始背景色加半透明 */
    border-radius: 8px;
    flex: 1 1 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease; /* 新增過渡效果 */
}

.info-block:hover {
    background-color: rgba(37, 37, 37, 0.95); /* 滑鼠移入時稍微不透明 */
}

.contact-info-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.info-block {
    text-align: center;
    padding: 20px;
    background-color: #252525;
    border-radius: 8px;
    flex: 1 1 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.info-block i {
    font-size: 2em;
    color: var(--color-accent-gold);
    margin-bottom: 10px;
}

.info-block h3 {
    margin-bottom: 10px;
    font-weight: 700;
}

.online-reservation-cta {
    display: block;
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: var(--color-accent-gold);
    color: var(--color-dark-bg);
    border: none;
    font-weight: bold;
}

.online-reservation-cta:hover {
    background-color: var(--color-accent-hover);
    transform: scale(1.05);
}

/* --- 頁腳 (Footer) --- */
footer {
    text-align: center;
    padding: 30px 5%;
    background-color: #0d0d0d;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    font-size: 0.9em;
}

.social-links a {
    font-size: 1.5em;
    margin: 0 10px;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-note {
    margin-top: 15px;
    color: #888;
}

/* --- 響應式設計 (RWD) --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5em;
    }

    .tagline {
        font-size: 1.2em;
    }

    h2 {
        font-size: 2em;
    }

    .gallery, .menu-highlights, .contact-info-grid {
        flex-direction: column;
        gap: 30px;
    }

    .gallery-item, .menu-card, .info-block {
        flex: 1 1 100%;
    }
}
/* --- 影片彈出視窗 (Modal) --- */
.modal {
    display: none; /* 預設隱藏 */

    /* **** 關鍵設定一：固定在視窗上 (不隨捲動軸移動) **** */
    position: fixed;

    /* **** 關鍵設定二：確保覆蓋整個視窗 **** */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    /* **** 關鍵設定三：確保在所有元素最上層 (數字越大越優先) **** */
    z-index: 1000;

    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* 黑色半透明背景 */

    /* 啟用淡入效果 */
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modal.open {
    /* 彈窗開啟時的顯示狀態 */
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center;   /* 垂直置中 */
    opacity: 1;
}

/* 桌機版 - 影片彈出視窗 */
.modal-content {
    position: relative;
    max-width: 600px;    /* 改用固定寬度,避免在大螢幕上太大 */
    max-height: 60vh;    /* 降低到 60vh */
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-gold) #252525;
}

.modal-content video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
}

/* 手機版 - 影片彈出視窗 */
@media (max-width: 768px) {
    .modal-content {
        max-width: 85%;      /* 手機上寬度 85% */
        max-height: 50vh;    /* 手機上高度 50vh,不會太大 */
        padding: 15px;
    }
}

/* 平板版 - 影片彈出視窗 */
@media (min-width: 769px) and (max-width: 1024px) {
    .modal-content {
        max-width: 500px;
        max-height: 55vh;
    }
}

/* Instagram/Facebook 貼文特殊處理 */
#random-post-container .instagram-media,
#random-post-container .fb-post {
    max-width: 100% !important;
    min-width: auto !important;
    margin: 0 auto !important;
}

/* Chrome/Safari/Edge 的滾動條樣式 (可選) */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #252525;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--color-accent-gold);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-hover);
}
/* 關閉按鈕 (請新增這段程式碼) */
.close-btn {
    /* 讓按鈕固定在 modal-content 的右上方 */
    position: absolute;
    top: -30px; /* 將按鈕放在 modal-content 容器的上面，讓它與影片邊緣分開 */
    right: 0px;
    
    /* 放大字體，讓按鈕更好點擊 */
    color: #fff; /* 白色 */
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;

    z-index: 1010; /* 確保它在黑色背景和影片之上 */
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-accent-gold); /* 滑鼠移上去變金色 */
    text-decoration: none;
}

/* --- 圖片放大 Modal 特殊樣式 --- */
.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    overflow: visible; /* 新增這行，防止捲軸出現 */
}

.image-modal-content img {
    width: 100%;
    height: 100%;
    max-width: 90vw;  /* 新增這行 */
    max-height: 90vh; /* 新增這行 */
    object-fit: contain;
    border-radius: 4px;
}

/* 為可點擊的圖片增加視覺提示 */
.gallery-item img {
    cursor: pointer;
    transition: opacity 0.5s, transform 0.5s, box-shadow 0.3s;
}

.menu-card img {
    transition: opacity 0.5s, transform 0.5s, box-shadow 0.3s;
}

.gallery-item img:hover,
.menu-card img:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* 手機版圖片放大 Modal */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95vw;
        max-height: 80vh;
    }
}

/* --- 彈出視窗尺寸最終修正 --- */

/* 1. 影片彈窗 (這個設定是正確的，保持不變) */
#video-modal .modal-content {
    padding: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 90vw;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    max-height: none !important; 
}
#video-modal .modal-content video {
    height: 100%;
    border-radius: 4px;
}


/* 2. 【核心修正】FB/IG 貼文彈窗 */
#post-modal .modal-content {
    /* 拿掉寫死的寬高，讓它變回彈性尺寸 */
    width: auto !important;
    height: auto !important;
    max-width: 500px !important;  /* 提供一個比較合理的寬度上限 */
    max-height: 70vh !important;  /* 提供一個比較合理的高度上限 */
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 8px;
    background-color: #fff !important;
}
#post-modal #random-post-container {
    width: 100%;
    height: 100%;
}
#post-modal iframe {
    /* 讓 iframe 自適應，但會被上面的 max-width/height 限制 */
    max-width: 100%;
    max-height: 85vh;
    border: none;
    display: block; /* 確保為塊級元素 */
}

