/* ==========================================
   饗宴之美 - 全域 CSS 變數與基礎設定
   ========================================== */
:root {
    /* 高級暗黑奢華色調調色盤 */
    --bg-primary: #0a0a0a;       /* 極深黑，作為背景主色 */
    --bg-secondary: #161616;     /* 暗灰色，用於卡片與區塊 */
    --accent-gold: #d4af37;      /* 奢華金，用於標題、強調字與按鈕 hover */
    --accent-orange: #D33C0D;    /* 深橘紅主色，代表美食的熱情 */
    --text-main: #f5f5f5;        /* 亮白灰，提供高對比的易讀性 */
    --text-muted: #a0a0a0;       /* 柔和灰，用於次要文字與說明 */
    --glass-bg: rgba(26, 26, 26, 0.7); /* 半透明玻璃背景 */
    --glass-border: rgba(255, 255, 255, 0.08); /* 玻璃細邊框 */
    
    /* 字體與陰影 */
    --font-primary: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --gold-glow: 0 0 20px rgba(212, 175, 55, 0.2);
    
    /* 動態過渡效果 */
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 基本重設 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   頂部導覽列 (Header)
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px); /* 磨砂玻璃效果 */
    border-bottom: 1px solid var(--glass-border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-gold);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    margin-left: 5px;
    text-transform: uppercase;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-gold);
}

/* 導覽列底線動畫 */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ==========================================
   英雄區塊 (Hero Section)
   ========================================== */
.hero-section {
    position: relative;
    height: 75vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    padding: 0 1.5rem;
}

/* 暗色漸層疊加罩，確保文字清晰易讀 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.9) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* 主要按鈕樣式 */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-orange), #e05a2b);
    color: var(--text-main);
    text-decoration: none;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(211, 60, 13, 0.4);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* ==========================================
   美食探索區塊 (Gallery Section)
   ========================================== */
.gallery-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.section-title h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-orange), var(--accent-gold));
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 300;
}

/* 分類篩選按鈕區 */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--text-main);
    border-color: var(--accent-gold);
    background-color: rgba(212, 175, 55, 0.05);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-gold));
    color: var(--text-main);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* ==========================================
   美食卡片網格 (Cards Grid)
   ========================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 固定 2 欄並列 */
    gap: 2.5rem;
}

/* 單個美食卡片 */
.food-card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

/* 卡片懸停動畫效果 */
.food-card:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), var(--gold-glow);
}

/* 卡片圖片容器：加高讓圖片有足夠空間完整顯示 */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 320px;          /* 加高以完整呈現照片 */
    overflow: hidden;
    background-color: #111; /* 深色背景，避免 contain 留白突兀 */
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;    /* 保留完整照片，不裁切 */
    transition: var(--transition-smooth);
}

/* 懸停時圖片縮放效果 */
.food-card:hover .card-image-wrapper img {
    transform: scale(1.08);
}

/* 卡片左上角分類標籤 */
.card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(5px);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 50px;
    font-weight: 600;
}

/* 卡片文字區 */
.card-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.food-card:hover .read-more {
    color: var(--text-main);
    transform: translateX(5px);
}

/* ==========================================
   關於我們區塊 (About Section)
   ========================================== */
.about-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 6rem 2rem;
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow), var(--gold-glow);
    transition: var(--transition-smooth);
}

.about-image:hover {
    transform: scale(1.02);
    border-color: var(--accent-gold);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    flex: 1.2;
    text-align: left;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-orange), var(--accent-gold));
    border-radius: 2px;
}

.about-text p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ==========================================
   頁尾 (Footer)
   ========================================== */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    background-color: var(--bg-primary);
}

.site-footer p {
    font-size: 0.9rem;
}

.footer-sub {
    font-size: 0.8rem !important;
    margin-top: 0.5rem;
    opacity: 0.5;
}

/* ==========================================
   詳細介紹互動彈窗 (Modal Overlay)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.85); /* 深色霧面背景 */
    backdrop-filter: blur(8px);           /* 背景模糊 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    
    /* 預設隱藏狀態 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* 顯示彈窗 class */
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* 彈窗主體容器 */
.modal-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 20px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), var(--gold-glow);
    
    /* 內容動畫：預設縮小 */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 彈窗顯示時內容放大 */
.modal-overlay.show .modal-container {
    transform: scale(1);
}

/* 關閉按鈕 (&times;) */
.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    background-color: var(--accent-orange);
    color: var(--text-main);
    transform: rotate(90deg);
}

/* 彈窗內容佈局 */
.modal-content {
    display: flex;
    flex-direction: row; /* 桌機版左右雙欄 */
}

/* 彈窗左側：圖片 */
.modal-image-area {
    width: 45%;
    position: relative;
    min-height: 450px;
}

.modal-image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 彈窗右側：文字介紹 */
.modal-text-area {
    width: 55%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.modal-badge {
    align-self: flex-start;
    background-color: rgba(211, 60, 13, 0.15);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1rem;
}

#modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

#modal-subtitle {
    font-size: 1rem;
    color: var(--accent-gold);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.modal-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, var(--glass-border), transparent);
    margin-bottom: 1.5rem;
}

.modal-desc-wrapper h6,
.modal-ingredients-wrapper h6 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.6rem;
    font-weight: 600;
    border-left: 3px solid var(--accent-gold);
    padding-left: 10px;
}

.modal-desc-wrapper p,
.modal-ingredients-wrapper p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 1.8rem;
    line-height: 1.7;
}

/* 隱藏原生捲軸但保留捲動功能 */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-thumb {
    background-color: var(--glass-border);
    border-radius: 10px;
}

/* ==========================================
   動畫效果 (Keyframes)
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   響應式版面設定 (Media Queries)
   ========================================== */
@media (max-width: 900px) {
    /* 彈窗在平板以下改為上下排列 */
    .modal-content {
        flex-direction: column;
    }
    
    .modal-image-area {
        width: 100%;
        height: 250px;
        min-height: auto;
    }
    
    .modal-text-area {
        width: 100%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links a {
        margin: 0 0.8rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }

    .gallery-section {
        padding: 3rem 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr; /* 手機版改為 1 欄 */
        gap: 2rem;
    }
    
    .filter-container {
        flex-wrap: wrap;
    }

    .about-container {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    .about-text {
        text-align: center;
    }

    .about-text h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================
   相片集區塊 (Photos Section)
   ========================================== */
.photos-section {
    /* 相片集整體區塊的內距與背景 */
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


/* 格狀排列：自動填滿，最小 260px 每欄 */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

/* 每一個相片格子 */
.photo-item {
    position: relative;          /* 讓覆蓋層可以定位 */
    aspect-ratio: 4 / 3;         /* 固定寬高比，讓格子整齊 */
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background-color: var(--bg-secondary);
}

/* 相片本身：填滿格子並裁切 */
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease; /* hover 時放大動畫 */
}

/* hover 時圖片放大 */
.photo-item:hover img {
    transform: scale(1.08);
}

/* 深色覆蓋層：預設透明，hover 時顯示 */
.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;                      /* 預設不顯示 */
    transition: opacity 0.4s ease;
}

/* hover 時覆蓋層淡入 */
.photo-item:hover .photo-overlay {
    opacity: 1;
}

/* 放大鏡圖示 */
.photo-overlay span {
    font-size: 2.5rem;
    color: var(--accent-gold);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

/* ==========================================
   圖片放大燈箱 (Lightbox)
   ========================================== */
.lightbox-overlay {
    /* 全螢幕黑色半透明遮罩 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;                      /* 預設隱藏 */
    pointer-events: none;            /* 隱藏時不可點擊 */
    transition: opacity 0.3s ease;
}

/* 燈箱開啟狀態 */
.lightbox-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* 燈箱中的大圖 */
.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    transition: opacity 0.2s ease;
}

/* 關閉按鈕 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 2.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.lightbox-close:hover {
    background: var(--accent-orange);
    transform: rotate(90deg);
}

/* 上一張 / 下一張按鈕 */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 1.8rem;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-gold);
    color: #000;
}

/* 響應式：手機版格子改 2 欄 */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}