/* ==================== 
   全域設定與變數 
   ==================== */
:root {
    --primary-color: #8C6A4F; /* 柔和咖啡色 */
    --secondary-color: #D4A373; /* 焦糖色 */
    --bg-color: #F5EFE6; /* 明顯的米白背景 */
    --text-color: #4A3F35; /* 搭配米白色的深灰咖文字 */
    --light-text: #FFFFFF; /* 白色文字 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth; /* 平滑滾動效果 */
}

/* 讓容器置中並限制最大寬度 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 
   導覽列 (Navbar) 
   ==================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

/* 網頁往下滾動時，導覽列加深的樣式 (透過 JS 切換) */
nav.scrolled {
    background-color: rgba(245, 239, 230, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    transition: color 0.3s ease;
}

nav.scrolled .logo {
    color: var(--primary-color);
    text-shadow: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    transition: color 0.3s ease;
}

nav.scrolled .nav-links a {
    color: var(--primary-color);
    text-shadow: none;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* 語言切換選單 */
.lang-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 5px 15px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.lang-wrapper i {
    margin-right: 8px;
}

.lang-wrapper:hover {
    background-color: var(--primary-color);
}

.lang-select {
    background: transparent;
    color: var(--light-text);
    border: none;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; /* 隱藏預設箭頭 */
}

/* 確保下拉選單內的選項有背景色，以免字看不見 */
.lang-select option {
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* ==================== 
   首頁橫幅 (Hero Section) 
   ==================== */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1554118811-1e0d58224f24?w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    color: var(--light-text);
    animation: fadeIn 1.5s ease-in-out; /* 淡入動畫 */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--light-text);
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px); /* 懸停時稍微往上移 */
}

/* ==================== 
   關於我們 (About Section) 
   ==================== */
.about-section {
    padding: 80px 20px;
    text-align: center;
    background-color: #EBE4D8;
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #666;
}

/* ==================== 
   特色餐點 (Menu Section) 
   ==================== */
.menu-section {
    padding: 80px 20px;
    background-color: var(--bg-color);
    text-align: center;
}

.menu-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.menu-intro {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

/* 網格排版，自動適應螢幕寬度 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 餐點卡片 */
.menu-card {
    background-color: #FCFBF7;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-10px); /* 懸停時整張卡片浮起 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.menu-card img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* 讓圖片填滿且不變形 */
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-content p {
    color: #666;
    font-size: 0.95rem;
}

/* ==================== 
   頁尾 (Footer) 
   ==================== */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* ==================== 
   動畫定義 (Keyframes) 
   ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 
   響應式設計 (RWD) 
   ==================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    nav {
        padding: 20px;
    }
    .nav-links li {
        margin-left: 15px;
    }
}
